package com.it.you.pojo;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

@Data
public class ValidateKey implements Serializable {
    //店铺id
    private Long storeId;

    public static ValidateKey build(Long storeId){
        ValidateKey validateKey = new ValidateKey();
        validateKey.setStoreId(storeId);
        return validateKey;
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ValidateKey that = (ValidateKey) o;
        return storeId.equals(that.storeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(storeId);
    }
}
